<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三栏布局</title>
    <style>
        /* flex布局 */
        /*         .outer {
            display: flex;
            height: 100px;
        }

        .left {
            width: 100px;
            background: tomato;
        }

        .right {
            width: 100px;
            background: gold;
        }

        .center {
            flex: 1;
            background: lightgreen;
        } */
        /* 利用浮动  中间一栏必须放在最后*/
        .outer {
            height: 100px;
        }

        .left {
            float: left;
            width: 100px;
            height: 100px;
            background: tomato;
        }

        .right {
            float: right;
            width: 200px;
            height: 100px;
            background: gold;
        }

        .center {
            height: 100px;
            margin-left: 100px;
            margin-right: 200px;
            background: lightgreen;
        }

        /* 利用绝对定位 */
        /*  .outer {
            position: relative;
            height: 100px;
        }

        .left {
            position: absolute;
            width: 100px;
            height: 100px;
            background: tomato;
        }

        .right {
            position: absolute;
            top: 0;
            right: 0;
            width: 200px;
            height: 100px;
            background: gold;
        }

        .center {
            margin-left: 100px;
            margin-right: 200px;
            height: 100px;
            background: lightgreen;
        } */

        /* 圣杯布局 */
        /* 双飞翼布局 */
    </style>
</head>

<body>
    <div class="outer">
        <div class="left">
            left-area
        </div>
        <div class="center">
            center-area
        </div>
        <div class="right">
            right-area
        </div>

    </div>
</body>

</html>